package com.ssy.lingxi.order.model.vo.basic.response;

import java.math.BigDecimal;
import java.math.RoundingMode;

/**
 * 业务员业绩统计-商品详情
 * @author 郑小翠
 * @version 2.02.18
 * @date 2022-03-16
 */
public class MemberSalesCountCommodityQueryVO {

    /**
     * 商品SkuId
     */
    private Long skuId;

    /**
     * 商品名称
     */
    private String commodityName;

    /**
     * 规格属性
     */
    private String spec;

    /**
     * 品类
     */
    private String category;

    /**
     * 数量
     */
    private BigDecimal quantity;

    /**
     * 销售额
     */
    private BigDecimal amount;

    /**
     * 已收款金额
     */
    private BigDecimal paidAmount;

    /**
     * 售后退款金额
     */
    private BigDecimal refundAmount;

    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    public String getCommodityName() {
        return commodityName;
    }

    public void setCommodityName(String commodityName) {
        this.commodityName = commodityName;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public BigDecimal getQuantity() {
        return quantity;
    }

    public void setQuantity(BigDecimal quantity) {
        this.quantity = quantity;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public BigDecimal getPaidAmount() {
        return paidAmount;
    }

    public void setPaidAmount(BigDecimal paidAmount) {
        this.paidAmount = paidAmount;
    }

    public BigDecimal getRefundAmount() {
        return refundAmount;
    }

    public void setRefundAmount(BigDecimal refundAmount) {
        this.refundAmount = refundAmount;
    }

    public String getSpec() {
        return spec;
    }

    public void setSpec(String spec) {
        this.spec = spec;
    }

    public MemberSalesCountCommodityQueryVO() {

    }

    public MemberSalesCountCommodityQueryVO(Long skuId, String commodityName, String category, String spec,  BigDecimal quantity, BigDecimal amount, BigDecimal paidAmount, BigDecimal refundAmount) {
        this.skuId = skuId;
        this.commodityName = commodityName;
        this.spec = spec;
        this.category = category;
        this.quantity = quantity.setScale(2, RoundingMode.HALF_UP);
        this.amount =amount.setScale(2, RoundingMode.HALF_UP);
        this.paidAmount = paidAmount.setScale(2, RoundingMode.HALF_UP);
        this.refundAmount = refundAmount;
    }

    @Override
    public String toString() {
        return "MemberSalesCountCommodityQueryVO{" +
                "skuId=" + skuId +
                ", commodityName='" + commodityName + '\'' +
                ", spec='" + spec + '\'' +
                ", category='" + category + '\'' +
                ", quantity=" + quantity +
                ", amount=" + amount +
                ", paidAmount=" + paidAmount +
                ", refundAmount=" + refundAmount +
                '}';
    }
}
